package icu.lookyousmileface.controller;

import icu.lookyousmileface.pojo.User;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author starrysky
 * @title: MyController
 * @projectName Swagger2_Final
 * @description: controller
 * @date 2021/2/200:50
 */
@Controller
public class MyController {


    @ResponseBody
    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    @ResponseBody
    @GetMapping("/swagger")
    public String swaggerIfo(){
        return "swagger";
    }

    @ResponseBody
    @ApiOperation("user请求")
    @PostMapping("/user")
    public User userSign( User user){
        System.out.println(user);
        return user;

    }
}
